/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ventanaPrincipal.java
 *
 * Created on 20/01/2012, 11:24:59 AM
 */
package vista;

import controlador.ControladorVentana;

/**
 *
 * @author Jesús Vásquez
 */
public class VentanaPrincipal extends javax.swing.JFrame {

    ControladorVentana controladorVentana;
    /** Creates new form ventanaPrincipal */
    public VentanaPrincipal() {
        initComponents();
        controladorVentana = new ControladorVentana();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLayeredPane1 = new javax.swing.JLayeredPane();
        jLabel1 = new javax.swing.JLabel();
        botonRegistro = new javax.swing.JButton();
        botonEstadistica = new javax.swing.JButton();
        botonActualizar = new javax.swing.JButton();
        botonSalir = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24));
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Consultorio");
        jLabel1.setBounds(225, 30, 150, 30);
        jLayeredPane1.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        botonRegistro.setFont(new java.awt.Font("Tahoma", 0, 14));
        botonRegistro.setText("Registrar Bebé");
        botonRegistro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonRegistroActionPerformed(evt);
            }
        });
        botonRegistro.setBounds(180, 100, 250, 50);
        jLayeredPane1.add(botonRegistro, javax.swing.JLayeredPane.DEFAULT_LAYER);

        botonEstadistica.setFont(new java.awt.Font("Tahoma", 0, 14));
        botonEstadistica.setText("Reporte de estadística");
        botonEstadistica.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonEstadisticaActionPerformed(evt);
            }
        });
        botonEstadistica.setBounds(180, 220, 250, 50);
        jLayeredPane1.add(botonEstadistica, javax.swing.JLayeredPane.DEFAULT_LAYER);

        botonActualizar.setFont(new java.awt.Font("Tahoma", 0, 14));
        botonActualizar.setText("Actualizar datos Bebé");
        botonActualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonActualizarActionPerformed(evt);
            }
        });
        botonActualizar.setBounds(180, 160, 250, 50);
        jLayeredPane1.add(botonActualizar, javax.swing.JLayeredPane.DEFAULT_LAYER);

        botonSalir.setFont(new java.awt.Font("Tahoma", 0, 14));
        botonSalir.setText("Salir");
        botonSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonSalirActionPerformed(evt);
            }
        });
        botonSalir.setBounds(180, 280, 250, 50);
        jLayeredPane1.add(botonSalir, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonActualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonActualizarActionPerformed
        controladorVentana.ventanaActualizarBebe(this);
    }//GEN-LAST:event_botonActualizarActionPerformed

    private void botonRegistroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonRegistroActionPerformed
        controladorVentana.ventanaRegistroBebe(this);
    }//GEN-LAST:event_botonRegistroActionPerformed

    private void botonEstadisticaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonEstadisticaActionPerformed
        controladorVentana.ventanaReporteBebe(this);
    }//GEN-LAST:event_botonEstadisticaActionPerformed

    private void botonSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonSalirActionPerformed
        controladorVentana.ventanaLogin(this);
    }//GEN-LAST:event_botonSalirActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonActualizar;
    private javax.swing.JButton botonEstadistica;
    private javax.swing.JButton botonRegistro;
    private javax.swing.JButton botonSalir;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLayeredPane jLayeredPane1;
    // End of variables declaration//GEN-END:variables
}
